home *** CD-ROM | disk | FTP | other *** search
- Path: news.accent.net!news
- From: dallaire@megatoon.com (Guy Dallaire)
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Josephus Problem
- Date: Mon, 15 Apr 1996 01:43:50 GMT
- Organization: Accent Internet
- Message-ID: <4ks9re$k47@news.accent.net>
- References: <1996Apr11.165209@topaz>
- NNTP-Posting-Host: 198.53.28.208
- X-Newsreader: Forte Free Agent 1.0.82
-
- naderr@topaz.cqu.edu.au wrote:
-
- >Hi,
-
-
- > Brief Description of Josephus Problem:
-
- > The program reads two positive integers, n and q.
- > Suppose n persons form a circle. In clockwise order, we assign
- > numbers 1,2,...,n to them. Starting at person 1 and counting clockwise
- > we remove the q-th person from the circles. In the reduced circle,
- > we continue with the person following the person just removed and,
- > resume counting from 1 to q, again eliminating the q-th person.
- > This process is repeated until only one person remains: the program
- > outputs the number n, of this person.
-
- So WHAT ?
- Guy Dallaire
- Groupe DMR Inc.
- dallaire@megatoon.com
-
- P.S. My opinions are my own and do not reflect those of my employer
-
-